#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName :cp2_2.18.py
# @Time     :2023/8/20 16:44
# @Author   :Ash
import bisect


def grade(score, breakpoints=None, grades='FDCBA'):
    if breakpoints is None:
        breakpoints = [60, 70, 80, 90]
    i = bisect.bisect(breakpoints, score)
    return grades[i]


if __name__ == "__main__":
    print([grade(score) for score in [33, 99, 77, 70, 89, 90, 100]])
